package carborn_IOC;

public class Car {
    private CarBody carBody;
    public Car(CarBody carBody) {
        this.carBody = carBody;
    }
    public void born() {
        carBody.born();
        System.out.println("car born");
    }
    public static void main(String[] args) {
        CarTrie carTrie = new CarTrie(33, "紫色");
        CarBottom carBottom = new CarBottom(carTrie);
        CarBody carBody = new CarBody(carBottom);
        Car car = new Car(carBody);
        car.born();
    }
}
